package org.dfl.plugin.dialogs;

import org.dfl.core.model.transitions.*;
import org.dfl.plugin.editor.model.TransitionModelElement;


/**
 * factory for transition properties dialogs
 * @author Piotr Wlodarczyk
 *
 */
public class TransitionPropertiesDialogFactory {
	public static TransitionPropertiesDialog getTransitionPropertiesDialog(TransitionModelElement tme){
		Transition t = tme.getTransition();
		if(t instanceof PiTransition){
			return new PiTransitionPropertiesDialog(tme); 
		}else if(t instanceof ExecTransition){
			return new ExecTransitionPropertiesDialog(tme); 
		}else if(t instanceof TavernaTransition){
			return new TavernaTransitionPropertiesDialog(tme);
		}if(t instanceof JarTransition){
			return new JarTransitionPropertiesDialog(tme);
		}else{
			return new TransitionPropertiesDialog(tme);
		}
	}
}
